package com.example.blog.common;import com.example.blog.entity.UserInfo;import jakarta.servlet.http.HttpServletRequest;import jakarta.servlet.http.HttpSession;public class UserSessionUtils {    public static UserInfo getUser(HttpServletRequest request)    {        HttpSession session = request.getSession(false);        if(session != null && session.getAttribute(AppVariable.USER_SESSION_KEY) != null)        {            return (UserInfo) session.getAttribute(AppVariable.USER_SESSION_KEY);        }        return null;    }}